How to solve the problem